package gui;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JToolBar;
import java.awt.BorderLayout;

public class Principal {

	private JFrame frmTatiArte;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Principal window = new Principal();
					window.frmTatiArte.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public Principal() {
		initialize();
		frmTatiArte.setLocationRelativeTo(null);  
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frmTatiArte = new JFrame();
		frmTatiArte.setTitle("Tati & Arte - Controle de Estoque de Fios");
		frmTatiArte.setBounds(100, 100, 626, 463);
		frmTatiArte.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		JMenuBar menuBar = new JMenuBar();
		frmTatiArte.setJMenuBar(menuBar);
		
		JMenu mnArquivo = new JMenu("Arquivo");
		menuBar.add(mnArquivo);
		
		JMenuItem mntmNewMenuItem = new JMenuItem("Sair");
		mntmNewMenuItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				System.exit(0);
			}
		});
		mnArquivo.add(mntmNewMenuItem);
		
		JMenu mnNewMenu = new JMenu("Cadastro");
		menuBar.add(mnNewMenu);
		
		JMenuItem mntmCores = new JMenuItem("Cores");
		mntmCores.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				new Cores().show();
			}
		});
		mnNewMenu.add(mntmCores);
		frmTatiArte.getContentPane().setLayout(null);
	}
}
